package com.modai.config;

import com.modai.componet.CustomFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author ：modai
 * @date ：Created in 2021-6-6 12:13
 * @description：
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {
    @Autowired
    private CustomFilter customFilter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(customFilter).addPathPatterns("/user/**");
    }
}
